<template>
	<view class="service-card">
		<view class="service-title"
			style="font-weight: 900; font-size: medium;margin-left: 30rpx; text-align: left; margin-bottom: 20rpx;">
			{{title}}
		</view>
		<view class="service-content">
			<view v-for="item in imgs" :key="item.text" 
			@click="click(item)"
			style="display: flex;flex-direction: column;margin: 5rpx 10rpx;"
			>

				<image class="img" :src='"../../static/example/" + item.url' mode="widthFix"></image>
				<text>{{item.text}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			imgs: {
				type: Array,
				default () {
					return [];
				}
			},
			title: {
				type: String,
				default () {
					return '服务功能';
				}
			}
		},
		compute: {

		},
		data() {
			return {

			}
		},
		created() {

		},
		mounted() {

		},
		methods: {
			click(val) {
				this.$emit('clickCard',val);
			}
		}
	}
</script>

<style lang="scss">
	.service-card {
		background-color: #ffff;
		border-radius: 15rpx;
		margin: 5rpx 20rpx 10rpx 20rpx;
		border: 1rpx #E4E7ED solid;
		text-align: center;

		.service-content {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			align-items: center;
			.img {
				width: 80rpx;
				margin: 10rpx;
			}
		}
	}
</style>
